<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户登录首页</title>
</head>
<body>
	<form action="<%=request.getContextPath() %>/user/userservlet.do" method="post" name="myForm" onsubmit="return login()">
	<input type="hidden" name="action" value="login">
  	<p>&nbsp;</p>
	  <table align="center">
	  	<tr>
	  		<td style="color:red" align="center">
	  			${MSG }
	  		</td>
	  	</tr>
		<tr>
			<td colspan="2">用户名：</td>
		</tr>
		<tr>
		  <td colspan="2"><input type="text" value="tom" name="uname" size=10" class="editbox"></td>
		</tr>
		<tr>
			<td colspan="2">密&nbsp;&nbsp;码：</td>
		</tr>
		<tr>
		  <td colspan="2"><input type="password"  value="123" name="upass" size=10"  class='editbox'></td>
		</tr>
		<tr>
		  <td colspan="2">
		  	<img id="myimg"  src="${pageContext.request.contextPath }/user/imageservlet">
		  	<script type="text/javascript">
		  		function notclear(){
		  			var now=new Date();//得到时间
		  			document.getElementById("myimg").src="<%=request.getContextPath()%>/user/imageservlet?no="+now.getTime();
		  		}
		  	</script>
		  	<a href="javascript:notclear()">看不清楚，再来一张</a>
		  </td>
		  </tr>
		<tr>
			<td colspan="2">验&nbsp;证&nbsp;码：</td>
		</tr>
		<tr>
			<td colspan="2">
				<input name="inputcode" class="editbox" size="10">
			</td>
		</tr>
		
		<tr>
			<td>
				<input type="hidden" name="sign" value="login"/>
				<input type="submit" value="登录" class='btn'>
				<input type="reset" value="重置" class='btn'>
			</td>
		</tr>
		<tr>
		  <td><a href="reg.jsp">注册用户</a></td>
		</tr>
	  </table>
   </form>
</body>
</html>